#include <stdio.h>

int a[10][20][30];

void insert(int x, int y, int z, int value)
{
	a[x][y][z] = value;
}

void main()
{

}

#if 0
/*
 * intel
 */
0000000000001129 <insert>:
    1129:	f3 0f 1e fa          	endbr64 
    112d:	55                   	push   %rbp
    112e:	48 89 e5             	mov    %rsp,%rbp
    1131:	89 7d fc             	mov    %edi,-0x4(%rbp)	// param4
    1134:	89 75 f8             	mov    %esi,-0x8(%rbp)	// param3
    1137:	89 55 f4             	mov    %edx,-0xc(%rbp)	// param2
    113a:	89 4d f0             	mov    %ecx,-0x10(%rbp)	// param1
    113d:	8b 45 f4             	mov    -0xc(%rbp),%eax	
    1140:	48 63 c8             	movslq %eax,%rcx	// rcx=param2
    1143:	8b 45 fc             	mov    -0x4(%rbp),%eax	
    1146:	48 98                	cltq   			// rax=param4
    1148:	8b 55 f8             	mov    -0x8(%rbp),%edx
    114b:	48 63 d2             	movslq %edx,%rdx	// rdx=param3
    114e:	48 69 f0 58 02 00 00 	imul   $0x258,%rax,%rsi	// rsi=		????
    1155:	48 89 d0             	mov    %rdx,%rax	// rax=
    1158:	48 c1 e0 04          	shl    $0x4,%rax
    115c:	48 29 d0             	sub    %rdx,%rax
    115f:	48 01 c0             	add    %rax,%rax
    1162:	48 01 f0             	add    %rsi,%rax
    1165:	48 01 c8             	add    %rcx,%rax
    1168:	48 8d 0c 85 00 00 00 	lea    0x0(,%rax,4),%rcx
    116f:	00 
    1170:	48 8d 15 c9 2e 00 00 	lea    0x2ec9(%rip),%rdx        # 4040 <a>      rdx=a
    1177:	8b 45 f0             	mov    -0x10(%rbp),%eax
    117a:	89 04 11             	mov    %eax,(%rcx,%rdx,1)
    117d:	90                   	nop
    117e:	5d                   	pop    %rbp
    117f:	c3                   	retq   

0000000000001180 <main>:
    1180:	f3 0f 1e fa          	endbr64 
    1184:	55                   	push   %rbp
    1185:	48 89 e5             	mov    %rsp,%rbp
    1188:	90                   	nop
    1189:	5d                   	pop    %rbp
    118a:	c3                   	retq   
    118b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

/*
 * arm
 */
000000000040051c <insert>:
  40051c:	d10043ff 	sub	sp, sp, #0x10
  400520:	b9000fe0 	str	w0, [sp, #12]           // w0=param1
  400524:	b9000be1 	str	w1, [sp, #8]            // w1=param2
  400528:	b90007e2 	str	w2, [sp, #4]            // w2=param3
  40052c:	b90003e3 	str	w3, [sp]                // w3=param4
  400530:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400534:	9100c003 	add	x3, x0, #0x30           // x3=a
  400538:	b98007e4 	ldrsw	x4, [sp, #4]            // x4=param3
  40053c:	b9800fe1 	ldrsw	x1, [sp, #12]           // x1=param1
  400540:	b9800be2 	ldrsw	x2, [sp, #8]            // x2=param2
  400544:	aa0103e0 	mov	x0, x1                  // x0=param1
  400548:	d37ef400 	lsl	x0, x0, #2              // x0=param1<<2
  40054c:	8b010000 	add	x0, x0, x1              // x0=param1<<2+param1
  400550:	d37cec01 	lsl	x1, x0, #4              // x1=(param1<<2+param1)<<4
  400554:	cb000021 	sub	x1, x1, x0              // x1=((param1<<2+param1)<<4)-((param1<<2+param1))
  400558:	d37df020 	lsl	x0, x1, #3              // x0=(((param1<<2+param1)<<4)-((param1<<2+param1)))<<3
  40055c:	aa0003e1 	mov	x1, x0                  // x1=(((param1<<2+param1)<<4)-((param1<<2+param1)))<<3
  400560:	aa0203e0 	mov	x0, x2                  // x0=param2
  400564:	d37cec00 	lsl	x0, x0, #4              // x0=param2<<4
  400568:	cb020000 	sub	x0, x0, x2              // x0=(param2<<4)-param2
  40056c:	d37ff800 	lsl	x0, x0, #1              // x0=((param2<<4)-param2)<<1
  400570:	8b000020 	add	x0, x1, x0              // x0=((((param1<<2+param1)<<4)-((param1<<2+param1)))<<3)+(((param2<<4)-param2)<<1)
  400574:	8b040000 	add	x0, x0, x4              // x0=x0+param3
  400578:	b94003e1 	ldr	w1, [sp]                // w1=param4
  40057c:	b8207861 	str	w1, [x3, x0, lsl #2]    // [a+x0<<2]=param4
  400580:	d503201f 	nop
  400584:	910043ff 	add	sp, sp, #0x10
  400588:	d65f03c0 	ret

000000000040058c <main>:
  40058c:	d503201f 	nop
  400590:	d65f03c0 	ret
  400594:	00000000 	.inst	0x00000000 ; undefined


#endif

